
//
//  QQAndWechatShareView.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/9/27.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "QQAndWechatShareView.h"

@implementation QQAndWechatShareView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor whiteColor];
        _QQBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_QQBtn setImage:[UIImage imageNamed:@"QQ"] forState:UIControlStateNormal];
        [_QQBtn addTarget:self action:@selector(QQshare) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_QQBtn];
        [_QQBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.mas_right).offset(scaleLeftAndRight(-120));
            make.bottom.equalTo(self.mas_bottom).offset(scaleTopAndBottom(-38));
            make.height.mas_equalTo(scaleTopAndBottom(37));
            make.width.mas_equalTo(scaleLeftAndRight(37));
        }];
        _WechatBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_WechatBtn setImage:[UIImage imageNamed:@"WEIIXN"] forState:UIControlStateNormal];
        [_WechatBtn addTarget:self action:@selector(wechatshare) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_WechatBtn];
        [_WechatBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.mas_left).offset(scaleLeftAndRight(120));
            make.bottom.equalTo(self.mas_bottom).offset(scaleTopAndBottom(-38));
            make.height.mas_equalTo(scaleTopAndBottom(37));
            make.width.mas_equalTo(scaleLeftAndRight(37));
        }];
        UILabel *QQLabel = [[UILabel alloc] init];
        QQLabel.text = @"QQ";
        QQLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:QQLabel];
        [QQLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.mas_right).offset(scaleLeftAndRight(-120));
            make.top.equalTo(_QQBtn.mas_bottom).offset(scaleTopAndBottom(10));
            make.height.mas_equalTo(scaleTopAndBottom(20));
            make.width.mas_equalTo(scaleLeftAndRight(45));
        }];
        UILabel *wechatLabel = [[UILabel alloc] init];
        wechatLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:wechatLabel];
        wechatLabel.text = @"微信";
        [wechatLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.mas_left).offset(scaleLeftAndRight(120));
            make.top.equalTo(_WechatBtn.mas_bottom).offset(scaleTopAndBottom(10));
            make.height.mas_equalTo(scaleTopAndBottom(20));
            make.width.mas_equalTo(scaleLeftAndRight(45));
        }];
        
    }
    return self;
}
-(void)QQshare{
}
-(void)wechatshare{
    
}
@end
